package com.cn.yl.controller;  
  
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.cn.yl.model.SecUser;
import com.cn.yl.service.IUserService;  
  

  
@Controller  
@RequestMapping("/user")  
public class userController {  
    @Resource  
    private IUserService userService;  
      
    @RequestMapping("/showUser")  
    public String toIndex(HttpServletRequest request,Model model){  
    	int userId = Integer.parseInt(request.getParameter("id"));  
        SecUser user = userService.getUserById(userId);
        model.addAttribute("user", user);  
        return "test";  
    }  
}  